package com.gite.nouette.admin.implementation.controller;

import java.util.List;

import com.gite.nouette.admin.contract.controller.ICContainerModule;
import com.gite.nouette.admin.contract.controller.ICHandlerModule;
import com.gite.nouette.admin.contract.controller.ICManager;
import com.gite.nouette.admin.contract.model.ICommand;
import com.gite.nouette.admin.contract.model.IContainerModule;
import com.gite.nouette.admin.contract.model.IHandlerModule;
import com.gite.nouette.admin.contract.model.IManager;
import com.gite.nouette.admin.contract.model.IModule;
import com.gite.nouette.admin.contract.model.IPair;
import com.gite.nouette.admin.contract.view.IVManager;

public class CManagerImpl extends AbstractController<IVManager, IManager>
		implements ICManager {

	@Override
	public IHandlerModule getHandlerModule() {
		return getM().getHandlerModule();
	}

	@Override
	public void setHandlerModule(IHandlerModule handlerModule) {
		setCHandlerModule((ICHandlerModule) handlerModule);
	}

	@Override
	public IContainerModule getContainerModule() {
		return getM().getContainerModule();
	}

	@Override
	public void setContainerModule(IContainerModule containerModule) {
		setCContainerModule((ICContainerModule) containerModule);
	}

	@Override
	public ICHandlerModule getCHandlerModule() {
		return (ICHandlerModule) getHandlerModule();
	}

	@Override
	public void setCHandlerModule(ICHandlerModule CHandlerModule) {
		getM().setHandlerModule(CHandlerModule);
		getV().setHandlerModule(CHandlerModule.getV());
	}

	@Override
	public ICContainerModule getCContainerModule() {
		return (ICContainerModule) getContainerModule();
	}

	@Override
	public void setCContainerModule(ICContainerModule CContainerModule) {
		getM().setContainerModule(CContainerModule);
		getV().setContainerModule(CContainerModule.getV());
	}

	@Override
	public boolean addCommand(ICommand command) {
		return getM().addCommand(command);
	}

	@Override
	public boolean removeCommmand(ICommand command) {
		return getM().removeCommmand(command);
	}

	@Override
	public void addColumn(int index) {
		getM().addColumn(index);
	}

	@Override
	public List<IModule> removeColumn(int index) {
		return getM().removeColumn(index);
	}

	@Override
	public int getNbColumn() {
		return getM().getNextIndexColumn();
	}

	@Override
	public int getNextIndexColumn() {
		return getM().getNbColumn();
	}

	@Override
	public IPair<Integer, Integer> addModule(IModule module) {
		return getM().addModule(module);
	}

	@Override
	public int addModule(IModule module, int colNum) {
		return getM().addModule(module, colNum);
	}

	@Override
	public void addModule(IModule module, int colNum, int rowNum) {
		getM().addModule(module, colNum, rowNum);
	}

	@Override
	public boolean removeModule(IModule module) {
		return getM().removeModule(module);
	}

	@Override
	public int getNbModule() {
		return getM().getNbModule();
	}
}
